Skip to content

Conversation

@reklatsmasters
Copy link

This PR implements byteLength method. API is the same as in Buffer.byteLength.

@ashtuchkin
Copy link
Contributor

Interesting, is it much faster than iconv.encode(..).length? What's the use case here?

@reklatsmasters
Copy link
Author

@ashtuchkin It's faster for internal and single-byte encodings. The use cases are the same as for Buffer.byteLength - if you want to known size of string in bytes before encoding.

@ashtuchkin
Copy link
Contributor

ashtuchkin commented Jul 10, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants